/** When your routing table is too long, you can split it into small modules**/

import Layout from '@/layout'

const chartsRouter = {
  path: '/goods-manage',
  component: Layout,
  redirect: '/goods-manage/goods-list',
  name: 'GoodsManage',
  meta: {
    title: '商品管理',
    icon: 'component'
  },
  children: [
    {
      path: 'goods-list',
      component: () => import('@/views/goods-manage/goods-list'),
      name: 'GoodsList',
      meta: { title: '商品列表' }
    },
    {
      path: 'goods-check',
      component: () => import('@/views/goods-manage/goods-check'),
      name: 'GoodsCheck',
      meta: { title: '商品审核' }
    },
    {
      path: 'goods-set',
      component: () => import('@/views/goods-manage/goods-set/index'), // Parent router-view
      name: 'Menu1',
      meta: { title: '商品设置' },
      redirect: '/goods-manage/goods-set/class-list',
      children: [
        {
          path: 'class-list',
          component: () => import('@/views/goods-manage/goods-set/class-list'),
          name: 'ClassList',
          meta: { title: '分类列表' }
        },
        {
          path: 'brand-list',
          component: () => import('@/views/goods-manage/goods-set/brand-list'),
          name: 'BrandList',
          meta: { title: '品牌列表' }
        },
        {
          path: 'specs-list',
          component: () => import('@/views/goods-manage/goods-set/specs-list'),
          name: 'SpecsList',
          meta: { title: '规格列表' }
        },
        {
          path: 'class-manage',
          component: () => import('@/views/goods-manage/goods-set/class-manage'),
          name: 'ClassManage',
          meta: { title: '分类管理' }
        }
      ]
    },
    {
      path: 'serve-manage',
      component: () => import('@/views/goods-manage/serve-manage'),
      name: 'ServeManage',
      meta: { title: '服务管理' }
    },

  ]
}

export default chartsRouter
